package com.gonsin.gview.example.enums;

import io.swagger.annotations.ApiModelProperty;

import java.util.Arrays;
import java.util.List;

/**
 * 菜单管理
 */
public enum Menus {

//    INDEX(1, "会议室预约", "index", "el-icon-office-building"),
    INDEX2(2, "会议室预约", "newRoomMeeting", "el-icon-s-home"),


    /**
     * 资源管理以ENTITY开头
     */
    ENTITY(100, "资源管理", "", "el-icon-office-building"),
    ENTITY_BUILDING(101, "楼栋管理", ENTITY, "buildingManagement"),
    ENTITY_FLOOR(102, "楼层管理", ENTITY, "floorManagement"),
    ENTITY_ROOM(103, "会议室管理", ENTITY, "otherMeetingRoom"),
    ENTITY_ROOM_MANAGER(104, "会议室统计", ENTITY, "conferenceRoomStatistics"),
    CUSTOM_SEAT(808, "坐席设置",  ENTITY, "seatManagement"),


    /**
     * 企业管理以COMPANY开头
     */
    COMPANY(201, "企业管理", "", "el-icon-s-grid"),
    COMPANY_DEPARTMENT(202, "部门管理", COMPANY, "departmentList"),
    COMPANY_USER_MESSAGE(203, "人员管理", COMPANY, "peopleList"),


    /**
     * 会议管理以CONFERENCE开头
     */
    CONFERENCE(301, "会议管理", "", "el-icon-s-order"),
    CONFERENCE_BOOK(302, "我的预约", CONFERENCE, "myConference"),
    CONFERENCE_AUDIT(303, "待我审核", CONFERENCE, "meetingReview"),
    CONFERENCE_SETTING(304, "组织会议", CONFERENCE, "meetingOrganiztion"),
    CONFERENCE_HANDLE(305, "会后处理", CONFERENCE, "historyMeetingManagement"),




    /**
     * 运营管理相关以BUSINESS开头
     */
    BUSINESS(501,"运营管理", "", "el-icon-date"),
    BUSINESS_SETTING(503,"运营设置", BUSINESS, "rentSetting"),
    BUSINESS_AD(502,"广告管理", BUSINESS, "advertisementManagement"),
    BUSINESS_ROOM(504,"运营会议室", BUSINESS, "rentRooms"),
    BUSINESS_GOOD(505,"运营商品", BUSINESS, "rentGoods"),
    BUSINESS_PRICE(506, "订单管理", BUSINESS, "orderManagement"),
    BUSINESS_STATISTICS(507, "会议统计", BUSINESS, "priceEcharts"),

    /**
     * 运营管理相关以BUSINESS开头
     */
    DEVICE(601,"设备管理", "", "el-icon-mobile-phone"),
    DEVICE_LIST(602,"设备列表", DEVICE, "deviceList"),
    DEVICE_VERSION(602,"版本管理", DEVICE, "deviceManagement"),


    INFORMATION(701, "信息发布", "", "el-icon-warning"),
    DEVICE_IMAGE(703,"图片发布", INFORMATION, "imageList"),
    DEVICE_VIDEO(704,"视频发布", INFORMATION, "videoList"),


    ENVIRONMENT(801, "资源检测", "", "el-icon-picture-outline"),
    ENVIRONMENT_DEVICE(802, "系统检测", ENVIRONMENT, "systemMonitor"),
    ENVIRONMENT_TASK(803, "计划任务", ENVIRONMENT, "notificationList"),
//    ENVIRONMENT_POWER(603, "能耗检测", ENVIRONMENT, ""),
//    ENVIRONMENT_VIDEO(604, "视频检测", ENVIRONMENT, ""),

    /**
     * 定制以CUSTOM开头
     */
    CUSTOM(901, "定制管理", "", "el-icon-s-opportunity"),
    CUSTOM_DINGDING(902, "钉钉设置", CUSTOM, "dingdingSetting"),            // 钉钉设置: dingdingSetting 、  企业微信设置: qyWechat、   微信设置:wechatSetting
    CUSTOM_WECHAT(903, "微信设置", CUSTOM, "wechatSetting"),
    CUSTOM_QY(904, "企业微信设置", CUSTOM, "qyWechat"),
    CUSTOM_SMS(905, "短信设置", CUSTOM, "messageSetting"),
    CUSTOM_MESSAGE(906, "消息设置",  CUSTOM, "messagesList"),
    CUSTOM_MESSAGE_RECORD(907, "短信发送记录",  CUSTOM, "sendMessageRecord"),
//    CUSTOM_API(407, "接口对接",  CUSTOM, ""),


    NAMEPLATE(1001, "铭牌管理", "", "el-icon-data-board"),
    NAMEPLATE_AP(1002, "基站管理", NAMEPLATE, "nameplateAp"),            // 钉钉设置: dingdingSetting 、  企业微信设置: qyWechat、   微信设置:wechatSetting
    NAMEPLATE_DEVICE(1003, "铭牌设备", NAMEPLATE, "nameplateDevice"),
    NAMEPLATE_TEMPLATE(1004, "模板管理", NAMEPLATE, "nameplateTemplate"),

    SYSTEM(1101, "系统管理", "", "el-icon-menu"),
    SYSTEM_GROUP(1102, "权限设置", SYSTEM, "groupManagement"),
    SYSTEM_ACCOUNT(1103, "账号设置", SYSTEM, "subAccountManagement"),
    SYSTEM_MY_ACCOUNT(1104, "我的设置", SYSTEM, "updateUserInformation"),
    SYSTEM_SETTING(1105, "系统设置", SYSTEM, "assetsSetting"),
    ;


    @ApiModelProperty("标题")
    private final String title;

    @ApiModelProperty("父菜单")
    private Menus parent;

    @ApiModelProperty("点击路径")
    private String url;

    @ApiModelProperty("排序")
    private int index;

    @ApiModelProperty("菜单图标")
    private String icon;

    Menus(int index, String title, String url, String icon) {
        this.index = index;
        this.title = title;
        this.url = url;
        this.icon = icon;
    }

    Menus(int index, String title, Menus parent, String url) {
        this.title = title;
        this.index = index;
        this.parent = parent;
        this.url = url;
    }

    /**
     * 获取菜单列表
     * @return
     */
    public static List<Menus> toList() {
        return Arrays.asList(values());
    }

    public String getTitle() {
        return title;
    }

    public Menus getParent() {
        return parent;
    }

    public String getUrl() {
        return url;
    }

    public int getIndex() {
        return index;
    }

    public String getIcon() {
        return icon;
    }
}
